Skip to content

Comments

Add sodium_crypto_secretbox_keygen function stub#4954

Merged
VincentLanglet merged 1 commit intophpstan:2.1.xfrom
thePanz:patch-2
Feb 17, 2026
Merged

Add sodium_crypto_secretbox_keygen function stub#4954
VincentLanglet merged 1 commit intophpstan:2.1.xfrom
thePanz:patch-2

Conversation

@thePanz
Copy link
Contributor

@thePanz thePanz commented Feb 16, 2026

According to the docs, the function returns a non-empty string: https://www.php.net/manual/en/function.sodium-crypto-secretbox-keygen.php

Copy link
Contributor

@staabm staabm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@VincentLanglet VincentLanglet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it return '0' or is it non-falsy ?

@staabm
Copy link
Contributor

staabm commented Feb 17, 2026

most of this 'encoding' functions just use non-empty-string atm. I think thats good enough.

@VincentLanglet VincentLanglet merged commit 0c2ab3b into phpstan:2.1.x Feb 17, 2026
638 of 646 checks passed
@staabm
Copy link
Contributor

staabm commented Feb 17, 2026

Thank you @thePanz

@thePanz
Copy link
Contributor Author

thePanz commented Feb 17, 2026

Thank you @staabm @VincentLanglet
I will try to find time and add another PR for the other sodium_ ... _keygen() functions

@thePanz thePanz mentioned this pull request Feb 18, 2026
13 tasks
@thePanz thePanz deleted the patch-2 branch February 19, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants